package xyz.wanhongtao.smtpclient.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wanghongtao <wanghongtao05@kuaishou.com>
 * Created on 2023-07-03
 */
@Slf4j
@Configuration
public class LoginInterceptor implements HandlerInterceptor {

    //检查登陆
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        log.info(request.getRequestURI());
        String authorization = request.getHeader("Authorization");
        return HandlerInterceptor.super.preHandle(request, response, handler);
    }
}
